<h1>Listing tags</h1>
<% if logged_in? %>
	<% a =current_user.id %>
	<% if (current_user.login == "admin")%>
		<table>
		<tr>
			<th>Tag</th>
		</tr>
	
		<% @tags.each do |tag| %>
		<tr>
			<td><%=h tag.tag %></td>
			<td><%= link_to 'Show', tag %></td>
			<td><%= link_to 'Edit', edit_tag_path(tag) %></td>
			<td><%= link_to 'Destroy', tag, :confirm => 'Are you sure?', :method => :delete %></td>
		</tr>
		<% end %>
		</table>

		<br />

			<%= link_to 'New tag', new_tag_path %> | <%= link_to 'Regresar', root_path %>



	<% else %>
		<h2>No tiene permiso para ver esta p&aacute;gina!</h2>
		<p><%= link_to 'Regresar', root_path %></p>
	<% end %>
<% else %>
	<h2>No has iniciado sesi&oacute;n!</h2>
	<p><%= link_to 'Reg&iacute;strate', signup_path%> or <%= link_to 'Inicia sesi&oacute;n', login_path%></p>
<% end %>
